package com.student.model;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.directwebremoting.annotations.DataTransferObject;
import org.directwebremoting.annotations.RemoteProperty;

/**
 * PoliticsStatus entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "Politics_Status", schema = "dbo", catalog = "StudentManager")
@DataTransferObject
public class PoliticsStatus implements java.io.Serializable {

	// Fields
	@RemoteProperty
	private Long politicsStatusId;
	@RemoteProperty
	private String politicsStatusType;
	private Set<Student> students = new HashSet<Student>(0);
	private Set<ParentInfo> parentInfos = new HashSet<ParentInfo>(0);

	// Constructors

	/** default constructor */
	public PoliticsStatus() {
	}

	/** minimal constructor */
	public PoliticsStatus(Long politicsStatusId, String politicsStatusType) {
		this.politicsStatusId = politicsStatusId;
		this.politicsStatusType = politicsStatusType;
	}

	/** full constructor */
	public PoliticsStatus(Long politicsStatusId, String politicsStatusType,
			Set<Student> students, Set<ParentInfo> parentInfos) {
		this.politicsStatusId = politicsStatusId;
		this.politicsStatusType = politicsStatusType;
		this.students = students;
		this.parentInfos = parentInfos;
	}

	// Property accessors
	@Id
	@Column(name = "Politics_Status_id", unique = true, nullable = false, precision = 18, scale = 0)
	@GeneratedValue
	public Long getPoliticsStatusId() {
		return this.politicsStatusId;
	}

	public void setPoliticsStatusId(Long politicsStatusId) {
		this.politicsStatusId = politicsStatusId;
	}

	@Column(name = "Politics_Status_Type", nullable = false, length = 20)
	public String getPoliticsStatusType() {
		return this.politicsStatusType;
	}

	public void setPoliticsStatusType(String politicsStatusType) {
		this.politicsStatusType = politicsStatusType;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "politicsStatus")
	public Set<Student> getStudents() {
		return this.students;
	}

	public void setStudents(Set<Student> students) {
		this.students = students;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "politicsStatus")
	public Set<ParentInfo> getParentInfos() {
		return this.parentInfos;
	}

	public void setParentInfos(Set<ParentInfo> parentInfos) {
		this.parentInfos = parentInfos;
	}

}